#include <iostream>

using namespace std;
const int N = 100010;
int n;
int p[N];
void quick_sort(int p[], int h, int t)
{
    if(h >= t) return;
    int tmp = p[(h+t)>>1], i = h-1, j = t+1;
    while(i < j)
    {
        do i++; while(p[i] < tmp);
        do j--; while(p[j] > tmp);
        if(i < j) swap(p[i],p[j]);
    }
    quick_sort(p, h, j);
    quick_sort(p, j+1, t);

}
int main()
{
    int i;
    scanf("%d", &n);
    for(i = 0; i < n; i++) scanf("%d", &p[i]);

    quick_sort(p, 0, n-1);

    for(i = 0; i < n; i++) printf("%d ",p[i]);

    return 0;
}
